<?php
/**
 * @filename Goose.php
 * @author LD King
 * @encoding UTF-8
 * @date 2008-9-19 | 下午03:52:32
 * @package 12-MVC
 * @subpackage 
 * @usage 鹅以及 鹅的适配器
 * @note 
 * @copyright Copyright (c) 2007 - 2008 LD (http://mifunny.info)
 * @version $Id: $
 */

/**
 * 鹅类， 据说有水塘的地方一定会有鸭子和鹅鹅鹅……
 *
 */
class Goose {
	/**
	 * 鹅咯咯叫
	 *
	 */
	public function honk() {
		echo "Goose: Honk.<br />";
	}
} /* END class Goose */

/**
 * 鹅的适配器， 也就是把鹅装扮成鸭子
 *
 */
class GooseAdapter implements Quackable {
	/**
	 * 鹅对象
	 *
	 * @var Goose
	 */
	public $goose;
	
	public function __construct(Goose $goose) {
		$this->goose = $goose;
	}
	
	public function quack() {
		echo "GooseAdapter  ──  ";
		$this->goose->honk();
	}
} /* END class GooseAdapter */

?>